#!/bin/bash
git clone https://gitee.com/yy126/opencv.git
cd opencv
git checkout 3.2
mkdir -p build
cd build
rm CMakeCache.txt
build_host()
{
   cmake -DCMAKE_BUILD_TYPE=RELEASE \
      -DCMAKE_INSTALL_PREFIX=/usr/local \
      -DINSTALL_PYTHON_EXAMPLES=OFF \
      -DINSTALL_C_EXAMPLES=OFF \
      -DBUILD_EXAMPLES=OFF \
      -DWITH_TIFF=OFF \
      -DWITH_JPEG=OFF \
      -DBUILD_opencv_legacy=OFF \
      -DWITH_IPP=OFF \
      -DWITH_CUDA=OFF \
      ..
   make -j8
}
build_host 2>&1 | tee tmp_opencv.log
